package SV_IL_FILE;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;

public class Example {
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        // use user Name as the unique prefix
        String debug = req.getParameter("debug");
        File file = File.createTempFile("tempfile", ".tmp");
        if (debug.equals("true")) {
            resp.getOutputStream().print("Using " + file.toString());
        }
        // ...
        file.delete();
    }
}
